///*****************************************Copyright(C)******************************************
//******************************************* *********************************************
//*------------------------------------------文件信息---------------------------------------------
//* FileName          : NB_IOT.h
//* Author            : 张婷颖
//* Version           : 1.0V
//* Description       : 底层使用NB-IOT的相关协议
//*----------------------------------------历史版本信息-------------------------------------------
//* History           :
//* Description       :
//*-----------------------------------------------------------------------------------------------
//***********************************************************************************************/
//#ifndef SCHEME_NB_IOT_H_
//#define SCHEME_NB_IOT_H_
///* Includes-----------------------------------------------------------------------------------*/
//#include "stdint.h"
//#include "top_scheme.h"
//#if NB_IOT
//#if MODBUS_NB_IOT
//#include "modbus_master.h"
//#endif  /*MODBUS_NB_IOT*/
///* Private define-----------------------------------------------------------------------------*/
////MQTT协议参数配置，1不可省略（用于脚本检测识别）
//#if MQTT_NB_IOT == 1
//#define NB_Broker_Address "iak0YeKpcHB.iot-as-mqtt.cn-shanghai.aliyuncs.com"
//#define NB_Broker_Port "1883"
//#define NB_User_Name "NBIoT_test&iak0YeKpcHB"
//#define NB_Password "91932BB49364D89A4B4490BCB4A274A16303F940"
//#define NB_Client_ID "00001|securemode=3,signmethod=hmacsha1|"
//#define NB_Sub_Topic "/sys/iak0YeKpcHB/NBIoT_test/thing/event/property/post_reply"
//#define NB_Pub_Topic "/sys/iak0YeKpcHB/NBIoT_test/thing/event/property/post"
//#define NB_QOS "0"
//#define NB_Clean_status "0"
//#endif /*MQTT_NB_IOT*/
//
//#if MODBUS_NB_IOT == 1
//#define NB_IP "192.168.71.92"
//#define NB_PORT "5020"
//#define MODBUS_TCP_NB_ADDR 0x01                                  //定义改端口的设备地址
//#define COIL_TCP_NB 1                                            //用于云端配置服务修改COIL的读取地址及参数
//#define REGISTER_TCP_NB   1                                      //用于云端配置服务修改REG的读取地址及参数
//
//#if COIL_TCP_NB
//#define SUM_COIL_CON_TCP_NB 3
//#define COIL_TCP_NB_ADDR {0x01A5,0x13A6,0x1821}
//#define COIL_TCP_NB_NUM {88,3,1}
//#endif  /*COIL*/
//
//#if REGISTER_TCP_NB
//#define SUM_REG_CON_TCP_NB 4
//#define REG_TCP_NB_ADDR {0x057A,0x0591,0x05E4,0x0640}
//#define REG_TCP_NB_NUM {5,1,4,4}
//#endif  /*REGISTER*/
//#endif /*MQTT_NB_IOT*/
//
///* Private typedef----------------------------------------------------------------------------*/
//typedef enum {                                                   //模块的各个状态标志
//	NBIOT_INIT,
//	NBIOT_DATA,                                                  //配置完成进入透传模式
//}NBIOT_FLAG_t;
//
//
//typedef enum
//{
//    NB_WORKMODE_NET = 0,  /*网络透传模式*/
//    NB_WORKMODE_MQTT,     /*mqtt透传模式*/
//} _nbiot_work_mode_eu;
//
//typedef struct
//{
//    uint32_t timeout; /*指令等待超时时间，单位：100ms*/
//    char *read_cmd;   /*查询参数指令      参考AT用户手册说明进行填写*/
//    char *write_cmd;  /*配置参数指令      参考AT用户手册说明进行填写*/
//} _nbiot_atcmd_st;
//
//
///* Private macro------------------------------------------------------------------------------*/
//
///* Private variables--------------------------------------------------------------------------*/
//extern NBIOT_FLAG_t nbiot_status;
//
//#if MODBUS_NB_IOT
//extern INFO_COMBINATION mnb_sum_info;
//#endif /*MODBUS_NB_IOT*/
///* Private function prototypes----------------------------------------------------------------*/
//
///* Private functions--------------------------------------------------------------------------*/
////void dtu_get_urc_info(uint8_t ch);
//void send_data_to_nb(uint8_t *data, uint32_t size);              //发送数据给nb
//int nbiot_config_init(_nbiot_work_mode_eu work_mode);            //nb配置初始化
//
//#if MODBUS_NB_IOT
//void RX_Analyse_info_MNB(uint8_t *p,uint8_t Len);                    //分析接收到的信息帧
//void RX_Parse_Data_MNB(INFO_COMBINATION *m485_sum_info);             //主循环分别解析处理接收的数据
//void MNB_read(void);                                                 //主循环MODBUS读取信息
//#endif  /*MODBUS_NB_IOT*/
//#endif /*NB_IOT*/
//#endif /* SCHEME_NB_IOT_H_ */
//
